package com.tedu.pojo;

/**
 * 用户的实体类
 */
public class User {

    String username;
    String password;
    int age;


    public String success() {
        return "欢迎" + username + "登陆成功";

    }

    public String fail() {
        return "登录失败,用户名或密码错误";

    }

//添加setXX方法，springmvc会调用set方法，注入值

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


}
